﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InformationSystem.BLL.Core.Dao;
using InformationSystem.BLL.Core.Model;


namespace InformationSystem.BLL.Core.Service.Impl
{

    public class SharedDocumentServiceImpl : ISharedDocumentService
    {
        public ISharedDocumentDao SharedDocumentDao { get; set; }

        public bool CreateDocument(FileInformation finfo)
        {
            return SharedDocumentDao.CreateDocument(finfo);
        }

        public bool DeleteDocument(int fileid, string userid)
        {
            return SharedDocumentDao.DeleteDocument(fileid, userid);
        }

        public bool DeleteDocument(int fileid)
        {
            return SharedDocumentDao.DeleteDocument(fileid);
        }

        public IList<FileInformation> GetDocuments(string userid)
        {
            return SharedDocumentDao.GetDocuments(userid);
        }

        public IList<Model.FileInformation> GetDocuments(int collegeid, int gradeid)
        {
            return SharedDocumentDao.GetDocuments(collegeid, gradeid);
        }

        public Model.FileInformation GetDocumentDetailByID(int fileid)
        {
            return SharedDocumentDao.GetDocumentDetailByID(fileid);
        }


        public IList<FileInformation> GetDocuments(LoginUser user, int recordcount)
        {
            return SharedDocumentDao.GetDocuments(user,recordcount);
        }
    }
}
